3.4 \(\int x^2 (a+b \tanh ^{-1}(c x)) \, dx\)

Optimal. Leaf size=46 \[ \frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}+\frac {b x^2}{6 c} \]

[Out]

1/6*b*x^2/c+1/3*x^3*(a+b*arctanh(c*x))+1/6*b*ln(-c^2*x^2+1)/c^3

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5916, 266, 43} \[ \frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}+\frac {b x^2}{6 c} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c*x]),x]

[Out]

(b*x^2)/(6*c) + (x^3*(a + b*ArcTanh[c*x]))/3 + (b*Log[1 - c^2*x^2])/(6*c^3)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5916

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcT
anh[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTanh[c*x])^(p - 1))/(1 -
 c^2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rubi steps

\begin {align*} \int x^2 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{3} (b c) \int \frac {x^3}{1-c^2 x^2} \, dx\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{6} (b c) \operatorname {Subst}\left (\int \frac {x}{1-c^2 x} \, dx,x,x^2\right )\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{6} (b c) \operatorname {Subst}\left (\int \left (-\frac {1}{c^2}-\frac {1}{c^2 \left (-1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {b x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 51, normalized size = 1.11 \[ \frac {a x^3}{3}+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}+\frac {1}{3} b x^3 \tanh ^{-1}(c x)+\frac {b x^2}{6 c} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c*x]),x]

[Out]

(b*x^2)/(6*c) + (a*x^3)/3 + (b*x^3*ArcTanh[c*x])/3 + (b*Log[1 - c^2*x^2])/(6*c^3)

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 58, normalized size = 1.26 \[ \frac {b c^{3} x^{3} \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, a c^{3} x^{3} + b c^{2} x^{2} + b \log \left (c^{2} x^{2} - 1\right )}{6 \, c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/6*(b*c^3*x^3*log(-(c*x + 1)/(c*x - 1)) + 2*a*c^3*x^3 + b*c^2*x^2 + b*log(c^2*x^2 - 1))/c^3

________________________________________________________________________________________

giac [B]  time = 0.23, size = 258, normalized size = 5.61 \[ \frac {1}{3} \, c {\left (\frac {{\left (\frac {3 \, {\left (c x + 1\right )}^{2} b}{{\left (c x - 1\right )}^{2}} + b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{3} c^{4}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{4}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{4}}{c x - 1} - c^{4}} + \frac {2 \, {\left (\frac {3 \, {\left (c x + 1\right )}^{2} a}{{\left (c x - 1\right )}^{2}} + a + \frac {{\left (c x + 1\right )}^{2} b}{{\left (c x - 1\right )}^{2}} - \frac {{\left (c x + 1\right )} b}{c x - 1}\right )}}{\frac {{\left (c x + 1\right )}^{3} c^{4}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{4}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{4}}{c x - 1} - c^{4}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{4}} + \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{4}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

1/3*c*((3*(c*x + 1)^2*b/(c*x - 1)^2 + b)*log(-(c*x + 1)/(c*x - 1))/((c*x + 1)^3*c^4/(c*x - 1)^3 - 3*(c*x + 1)^
2*c^4/(c*x - 1)^2 + 3*(c*x + 1)*c^4/(c*x - 1) - c^4) + 2*(3*(c*x + 1)^2*a/(c*x - 1)^2 + a + (c*x + 1)^2*b/(c*x
 - 1)^2 - (c*x + 1)*b/(c*x - 1))/((c*x + 1)^3*c^4/(c*x - 1)^3 - 3*(c*x + 1)^2*c^4/(c*x - 1)^2 + 3*(c*x + 1)*c^
4/(c*x - 1) - c^4) - b*log(-(c*x + 1)/(c*x - 1) + 1)/c^4 + b*log(-(c*x + 1)/(c*x - 1))/c^4)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 51, normalized size = 1.11 \[ \frac {x^{3} a}{3}+\frac {b \,x^{3} \arctanh \left (c x \right )}{3}+\frac {b \,x^{2}}{6 c}+\frac {b \ln \left (c x -1\right )}{6 c^{3}}+\frac {b \ln \left (c x +1\right )}{6 c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x)),x)

[Out]

1/3*x^3*a+1/3*b*x^3*arctanh(c*x)+1/6*b*x^2/c+1/6/c^3*b*ln(c*x-1)+1/6/c^3*b*ln(c*x+1)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 44, normalized size = 0.96 \[ \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*x^3*arctanh(c*x) + c*(x^2/c^2 + log(c^2*x^2 - 1)/c^4))*b

________________________________________________________________________________________

mupad [B]  time = 0.74, size = 44, normalized size = 0.96 \[ \frac {\frac {b\,\ln \left (c^2\,x^2-1\right )}{6}+\frac {b\,c^2\,x^2}{6}}{c^3}+\frac {a\,x^3}{3}+\frac {b\,x^3\,\mathrm {atanh}\left (c\,x\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*atanh(c*x)),x)

[Out]

((b*log(c^2*x^2 - 1))/6 + (b*c^2*x^2)/6)/c^3 + (a*x^3)/3 + (b*x^3*atanh(c*x))/3

________________________________________________________________________________________

sympy [A]  time = 0.73, size = 58, normalized size = 1.26 \[ \begin {cases} \frac {a x^{3}}{3} + \frac {b x^{3} \operatorname {atanh}{\left (c x \right )}}{3} + \frac {b x^{2}}{6 c} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{3 c^{3}} + \frac {b \operatorname {atanh}{\left (c x \right )}}{3 c^{3}} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*x**3/3 + b*x**3*atanh(c*x)/3 + b*x**2/(6*c) + b*log(x - 1/c)/(3*c**3) + b*atanh(c*x)/(3*c**3), Ne
(c, 0)), (a*x**3/3, True))

________________________________________________________________________________________